Skip to content

chore: remove unused dependencies#2543

Closed
BrendanWalsh wants to merge 1 commit intomasterfrom
brwals/cleanup-unused-deps
Closed

chore: remove unused dependencies#2543
BrendanWalsh wants to merge 1 commit intomasterfrom
brwals/cleanup-unused-deps

Conversation

@BrendanWalsh
Copy link
Copy Markdown
Collaborator

Summary

Remove packages with zero imports across the entire codebase.

environment.yml

  • PyGithub: no import github found anywhere in the repo
  • tqdm: no direct imports — still available as transitive dep of transformers (v4.67.3)
  • mistletoe: markdown parser with zero imports — docs use docusaurus/sphinx
  • black==22.3.0: duplicate of black[jupyter]==22.3.0 (superset)

build.sbt

  • httpclient5 (5.1.3): zero imports of org.apache.hc.client5 — codebase uses v4 API (org.apache.http)
  • spark-tags: zero imports of org.apache.spark.tags (exclusion rule kept to prevent transitive pull)
  • httpmime: moved to % "test" scope — only imported in FabricOperations test
  • httpclient (4.5.13): added explicitly — was a silent transitive dep of httpmime, needed in compile scope by RESTUtils, HTTPSchema, HTTPClients, ClusterUtil

Validation (CI-mirror container: ubuntu:22.04, conda 24.11.1, JDK 11)

Check Result
conda env create
sbt compile ✅ (0 errors)
sbt Test/compile ✅ (0 errors)
sbt scalastyle; Test/scalastyle
black --check ✅ (176 files unchanged)
mistletoe removed ✅ not installed
PyGithub removed ✅ not installed
tqdm still works transitively ✅ via transformers

Remove packages with zero imports across the entire codebase:

environment.yml:
- PyGithub: no 'import github' found anywhere
- tqdm: no direct imports (transitive dep of transformers)
- mistletoe: no imports (markdown parser, unused — docs use docusaurus/sphinx)
- black==22.3.0: duplicate of black[jupyter]==22.3.0 (which is a superset)

build.sbt:
- httpclient5: zero imports of org.apache.hc.client5 (code uses v4 API)
- spark-tags: zero imports of org.apache.spark.tags (exclusion rule kept)
- httpmime: moved to test scope (only imported in FabricOperations test)
- httpclient: added explicitly — was previously a silent transitive dep
  of httpmime, needed in compile scope by RESTUtils, HTTPSchema, etc.

Validated: sbt compile, Test/compile, scalastyle all pass.
Copilot AI review requested due to automatic review settings April 4, 2026 02:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Hey @BrendanWalsh 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 366d72c.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR trims unused build and environment dependencies to reduce maintenance overhead and avoid carrying packages that aren’t referenced in SynapseML’s Scala/Python codepaths.

Changes:

  • Remove unused Python pip packages from environment.yml (PyGithub, tqdm, mistletoe, and the redundant black==22.3.0 pin).
  • Remove unused Scala/Spark deps from build.sbt (spark-tags, httpclient5) and adjust Apache HttpComponents scoping (add httpclient to compile; move httpmime to test).
Show a summary per file
File Description
environment.yml Removes pip packages with zero imports and deduplicates black pinning via black[jupyter].
build.sbt Drops unused deps, removes HttpClient 5, explicitly adds HttpClient 4 to compile scope, and scopes httpmime to tests.

Copilot's findings

  • Files reviewed: 1/2 changed files
  • Comments generated: 1

Comment thread environment.yml
Comment on lines 24 to 28
- nbconvert
- nbformat
- pyyaml
- PyGithub
- tqdm
- ipython
- pytest-codeblocks
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says tqdm remains available transitively via transformers v4.67.3, but environment.yml pins transformers==4.49.0. Please update the PR description (or adjust the validation note) to match the actual pinned version so readers can trust the dependency rationale.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants